﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="treeview.aspx.cs" Inherits="Ecreate.Web.systemanage.customer.treeview" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
       <link rel="stylesheet" type="text/css" href="/content/javascript/XTree25/dhtmlXTree.css"/>   
       <script type="text/javascript"  src="/content/javascript/jquery/jquery-1.3.2.js" ></script>
       <script type="text/javascript" src="/content/javascript/XTree25/dhtmlXCommon.js"></script>
	   <script type="text/javascript" src="/content/javascript/XTree25/dhtmlXTree.js"></script>	
	   <script type="text/javascript" src="/popedom/data/areaxml.js"></script>	
	   
	   
	   <script type="text/javascript" language="javascript">
	       function createTree() {
               tree_productclass = new dhtmlXTreeObject("tree_product", "100%", "100%", 0);
               tree_productclass.setSkin('dhx_skyblue');
               tree_productclass.setImagePath("/content/javascript/XTree25/imgs/csh_bluefolders/");
               tree_productclass.setOnClickHandler(tree_productOnclick);
               tree_productclass.loadXML("/popedom/data/area.xml", null);
           }

           function tree_productOnclick(nodeId) {
               var lastflag = tree_productclass.getUserData(nodeId, "lastflag");
               if (typeof (lastflag) == "undefined" || lastflag == "") return;
               if (lastflag == "1") {
                   window.parent.frames["contentIframe"].location = "/systemanage/customer/customerlist.aspx?areacode=" + nodeId;
               }
           }           
           
           $(document).ready(function() {
                 createTree();
                 window.parent.frames["contentIframe"].location = "/systemanage/client.aspx";
                
           }); 
        </script>              
</head>
<body>
    <form id="form1" runat="server">
        <div id="tree_product" style="overflow:auto; height:100%">
        </div>	
    </form>
</body>
</html>
